package vista;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTable;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import javax.swing.table.AbstractTableModel;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class vLIngredienteDis extends javax.swing.JFrame {
	private JLabel lbltitulo;
	private JButton Salir;
	private JScrollPane scmodelotabla;
	private JTable tblIngredientes;
	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				vLIngredienteDis inst = new vLIngredienteDis();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public vLIngredienteDis() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setBackground(new java.awt.Color(255,255,255));
			getContentPane().setLayout(null);
			{
				lbltitulo = new JLabel();
				getContentPane().add(lbltitulo);
				lbltitulo.setText("Cantidad de Ingredientes Disponibles");
				lbltitulo.setBounds(95, 30, 298, 29);
				lbltitulo.setFont(new java.awt.Font("Segoe UI",1,16));
			}
			{
				Salir = new JButton();
				getContentPane().add(Salir);
				Salir.setText("Salir");
				Salir.setBounds(385, 312, 102, 23);
			}
			{
				scmodelotabla = new JScrollPane();
				getContentPane().add(scmodelotabla);
				scmodelotabla.setBounds(36, 78, 435, 164);
				{
					tblIngredientes = new JTable();
					scmodelotabla.setViewportView(tblIngredientes );
				}
			}
			pack();
			this.setSize(522, 396);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	public void mostrarMensaje(String mensaje) {
		JOptionPane.showMessageDialog(this, mensaje);
	}
	public void setResultados(AbstractTableModel abstractTableModel) {
		tblIngredientes.setModel(abstractTableModel);
	}
	public void addListener(ActionListener actionListener) {
		Salir.addActionListener(actionListener);
		}
}
